package de.dubiel.plung.client.pages.start;

import com.google.gwt.activity.shared.AbstractActivity;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.ui.AcceptsOneWidget;

import de.dubiel.plung.client.gin.ClientGinjector;

public class StartActivity extends AbstractActivity {
    private final ClientGinjector clientFactory;

    public StartActivity(StartPlace place, ClientGinjector clientFactory) {
        this.clientFactory = clientFactory;
    }

    @Override
    public void start(AcceptsOneWidget containerWidget, EventBus eventBus) {
        StartView startView = clientFactory.getStartView();
        containerWidget.setWidget(startView.asWidget());
        startView.refreshHighScore();
    }
}